Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony commented Feb 7, 2025

Before: Average execution time : 416

After: Average execution time : 78

@Grufoony Grufoony requested a review from sbaldu February 7, 2025 18:19
std::execution::par_unseq,
m_graph.nodeSet().begin(),
m_graph.nodeSet().end(),
[this, &shortestDistances, &destinationID](auto const& it) -> void {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
minDistance) < 1.}; // 1 meter tolerance between shortest paths
if (nextNodeId == destinationID) {
if (bIsMinDistance) {
if (std::abs(m_graph.street(nodeId * dimension + nextNodeId)->length() -

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
} else if ((nextNodeId != destinationID)) {
Logger::warning(std::format(
"No path found from node {} to node {}", nextNodeId, destinationID));
auto const distance{shortestDistances[nextNodeId]};

Check warning

Code scanning / Cppcheck (reported by Codacy)

Local variable 'distance' shadows outer function Warning

Local variable 'distance' shadows outer function
@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.56%. Comparing base (9d263b0) to head (bf969b8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #260      +/-   ##
==========================================
+ Coverage   90.48%   90.56%   +0.08%     
==========================================
  Files          37       37              
  Lines        4898     4898              
  Branches      457      452       -5     
==========================================
+ Hits         4432     4436       +4     
+ Misses        466      462       -4     
Flag Coverage Δ
unittests 90.56% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

minDistance) < 1.}; // 1 meter tolerance between shortest paths
if (nextNodeId == destinationID) {
if (bIsMinDistance) {
if (std::abs(m_graph.street(nodeId * dimension + nextNodeId)->length() -

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
}
auto result{m_graph.shortestPath(nodeId, destinationID)};
if (!result.has_value()) {
// save the minimum distance between i and the destination

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
@Grufoony Grufoony changed the title Optimize updatePath function Optimize updatePath function with tbb Feb 10, 2025
@Grufoony Grufoony merged commit fc9590a into main Feb 10, 2025
28 checks passed
@Grufoony Grufoony deleted the optimizePaths branch February 10, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants